package com.mylove.judas.yaya.common.http;

import java.util.TreeMap;

import okhttp3.FormBody;
import okhttp3.RequestBody;

/**
 * Created by Administrator on 2017/5/27 0027.
 */
public class ParamPost {


    private TreeMap<String, Object> tm = new TreeMap<String, Object>();

    FormBody.Builder builder = new FormBody.Builder();

    public static ParamPost build(){
        return new ParamPost();
    }


    public  ParamPost put(String key, Object values){
        tm.put(key, values);
        builder.add(key, String.valueOf(values));
        return this;
    }


    public TreeMap<String, Object> getParams() {

        return tm;
    }


    public RequestBody getPostParams(){

        return builder.build();

    }


}
